-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(avc/slice): entire NALU consumed as slice header #272
Conversation
thejoeejoee
commented
Sep 26, 2023
•
edited
Loading
edited
- fix forloops in avc/slice header parser, where break doesn't break outer parser loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @thejoeejoee,
thanks for your PR. It looks fine to me.
How did you find the problem? Did you run the code towards an asset or by just reading the code? If you have some relevant test material it would be great to add a small bit of it.
6161e63
to
34e3d0d
Compare
Exactly, I was doing some experiments with encryption and parsed |
34e3d0d
to
daab25c
Compare
daab25c
to
1ab0463
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to get a test with small video NALUs!
avc/slice_test.go
Outdated
|
||
func TestParseSliceHeader_TwoFrames(t *testing.T) { | ||
wantedIdrHdr := SliceHeader{SliceType: SLICE_I, IDRPicID: 1, SliceQPDelta: 8, Size: 5} | ||
wantedNonIdrHdr := SliceHeader{SliceType: SLICE_P, FrameNum: 1, ModificationOfPicNumsIDC: 3, SliceQPDelta: 13, Size: 5, NumRefIdxActiveOverrideFlag: true, RefPicListModificationL0Flag: true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This line is 194 characters long, so it exceeds the maximum line length of 140 configured in .golangci.yml.
Just break it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed that, fixed
1ab0463
to
939329b
Compare
Great! Thanks for your contribution! |